package com.xdf.whiteaccount.service;
import com.xdf.whiteaccount.dto.PlanDTO;
import com.xdf.whiteaccount.utils.Example;
import com.xdf.whiteaccount.entity.ProducePlan;
import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2025-3-4 10:56:34
 */
public interface ProducePlanService {
    ProducePlan insert(ProducePlan record);

    ProducePlan insertSelective(ProducePlan record);

    List<ProducePlan> multiInsert(List<ProducePlan> list);

    int updateByPrimaryKey(ProducePlan record);

    int updateByPrimaryKeySelective(ProducePlan record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    ProducePlan selectByPrimaryKey(Integer id) throws Exception;
    // 根据主键作废
    int setVoid(Integer id);

    List<ProducePlan> selectAll();

    ProducePlan save(ProducePlan record);
    List<ProducePlan> multiSave(List<ProducePlan> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(ProducePlan record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default ProducePlan fullFill(ProducePlan record){
        return record;
    }

    default void doBeforeInsert(ProducePlan record){}
    default void doAfterInsert(ProducePlan record){}
    List<ProducePlan> selectByExample(Example<ProducePlan> example);
    ProducePlan moveBill(Integer id, String moveBillFlag);

    //=================以上是自动生成的代码，自定义代码请写在下面==================

    ProducePlan updateSelective(ProducePlan record) throws Exception;

    void auditAll();

    void setFinishedMark(Integer id);

    void setNoFinishedState(Integer id);

    ProducePlan selectMax();

    String maxOrderCode();

    List<Map<String, Object>> selectByKCMX(Integer id);
}